package top.hzy520.valuation.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.hzy520.valuation.entity.ProductSku;
import top.hzy520.valuation.service.ValuationService;

import java.math.BigDecimal;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 20:14 2018/6/26
 */
@RestController
@RequestMapping("/valuation")
public class ValuationController {
    @Autowired
    @Qualifier("valuationServiceImpl")
    private ValuationService valuationService;
    /**
    *@Author: HouZeYu
    *@Description: 计算单个商品价格
    *@Date: 11:45 2018/6/27
    */
    @RequestMapping("/goodsprice")
    public BigDecimal valuationGoodsPrice(@RequestBody ProductSku productSku){
      return valuationService.valuationGoodsPrice(productSku);
    }
}
